<?php
require_once("../../base/Db.php");
require_once("../../base/Tools.php");

if(isset($_GET['babyId'])){
	$babyId = $_GET['babyId'];
	$db = new Db;
	$sql = "select *from template where id = $babyId";
	$baby = $db->getRs($sql);
}
$op = unescape($_GET['op']);
//<tr><th>模板包主图路径</th><td><input name="babyMainPicPath" zReg=".+" type="file"  zNext="babyPath"/></td></tr>
//<tr><th>模板包路径</th><td><input name="babyPath" zReg=".+" type="file"  zNext="weAction"/></td></tr>
?>
<div class="right2_tt" align="left">
	<form name="addBabyForm" enctype="multipart/form-data" method="POST" action="div/baby/baby_done.php?w=aliyu">
	<input type="hidden" name="babyId" value="<?php echo $babyId ?>" />
	<table class="weEdit">
	    <tr><th>模板名称</th><td><input name="babyName" zReg=".+" type="text" zNext="babyProductCate" value="<?php echo !isset($babyId) ? "" : $baby['baby_name'] ?>"/></td></tr>
	    <tr><th>模板产品类别</th><td><select name="babyProductCate" zReg=".*" zNext="babyTemplateCate"><option value="1">服装、衣服</option><option value="2">电子电器</option></select></td></tr>
	    <tr><th>模板模板类别</th><td><select name="babyTemplateCate" zReg=".*" zNext="babyColorCate"><option value="1">红色</option><option value="2">蓝色</option><option value="3">黑色</option><option value="4">黄色</option></select></td></tr>
	    <tr><th>模板颜色类别</th><td><select name="babyColorCate" zReg=".*" zNext="babySnap"><option value="1">红色</option><option value="2">蓝色</option><option value="3">黑色</option><option value="4">黄色</option></select></td></tr>
	    
	    <tr><th>模板快照</th><td><input name="babySnap" zReg=".+" type="text"  zNext="babyDesc" value="<?php echo !isset($babyId) ? "" : $baby['baby_snap'] ?>" /></td></tr>
	    <tr><th>模板描述</th><td><textarea name="babyDesc" zReg=".+" rows="3" cols="20" zNext="weAction" value="<?php echo !isset($babyId) ? "" : $baby['baby_desc'] ?>"></textarea></td></tr>
	    
	   
	    <tr><td colspan="2" align="center"><input name="weAction" style="width:60px;height:30px;margin-top:10px;margin-bottom:10px;" type="button" value="<?php echo $op ?>"/>&nbsp;&nbsp;<input style="width:120px;height:30px;margin-top:10px;margin-bottom:10px;" type="button" value="返回模板列表"/></td></tr>
	 </table>
	</form>

</div>